-- GENERATED SPELL FOR [Starving Ghostclaw] --


function spell0_16347(pUnit, Event) --@Claw,n/a--
pUnit:FullCastSpellOnTarget(16828,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16347', 657, 1)
end

function spell1_16347(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16347', 0, 1)
end

function spell2_16347(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14916,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16347', 0, 1)
end

function spell3_16347(pUnit, Event) --@Prowl,Self--
pUnit:FullCastSpellOnTarget(24450,pUnit)
pUnit:RegisterEvent('Sorts_16347', 0, 1)
end

function spell4_16347(pUnit, Event) --@Rake,n/a--
pUnit:FullCastSpellOnTarget(59881,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16347', 9000, 1)
end

function Sorts_16347(pUnit, Event)
local choix_sorts_16347 = math.random(0, 4)
if choix_sorts_16347 == 0 then
pUnit:RegisterEvent('spell0_16347', 1, 1)
end
if choix_sorts_16347 == 1 then
pUnit:RegisterEvent('spell1_16347', 1, 1)
end
if choix_sorts_16347 == 2 then
pUnit:RegisterEvent('spell2_16347', 1, 1)
end
if choix_sorts_16347 == 3 then
pUnit:RegisterEvent('spell3_16347', 1, 1)
end
if choix_sorts_16347 == 4 then
pUnit:RegisterEvent('spell4_16347', 1, 1)
end
end

function mob16347_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16347', math.random(1500, 3000), 1)
end

function mob16347_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16347_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16347_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16347, 1, 'mob16347_Action')
RegisterUnitEvent(16347, 2, 'mob16347_Leave')
RegisterUnitEvent(16347, 3, 'mob16347_Kill')
RegisterUnitEvent(16347, 4, 'mob16347_Die')
